package org.goldfish.message_board01.entity;

import java.time.LocalDateTime;

public class MessagePreview {
    private int id;
    private String sender;
    private String title;
    private String preview;
    private LocalDateTime time;

    // Constructors
    public MessagePreview() {}

    public MessagePreview(int id, String sender, String title, String preview, LocalDateTime time) {
        this.id = id;
        this.sender = sender;
        this.title = title;
        this.preview = preview;
        this.time = time;
    }

    // Getters and Setters
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPreview() {
        return preview;
    }

    public void setPreview(String preview) {
        this.preview = preview;
    }

    public LocalDateTime getTime() {
        return time;
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "MessagePreview{" +
                "id=" + id +
                ", sender='" + sender + '\'' +
                ", title='" + title + '\'' +
                ", preview='" + preview + '\'' +
                ", time=" + time +
                '}';
    }
}

